package com.neusoft.crm.controller;


import com.neusoft.crm.entity.CommonResult;
import com.neusoft.crm.entity.Dict;
import com.neusoft.crm.service.IDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 东软集团
 * @since 2023-03-29
 */
@RestController
@RequestMapping("/dict")
@CrossOrigin
public class DictController {
    @Autowired
    IDictService  dictService;

//

    @GetMapping("/q/all")
    public CommonResult findall(){
        return  dictService.findall();
    }

    @PutMapping("/add")

    public   CommonResult  addDict( @RequestBody Dict dict){
        return   dictService.addDict(dict);
    }

    @PostMapping("/mod")
    public   CommonResult  modDict( @RequestBody Dict dict){
        return   dictService.modDict(dict);
    }


}
